package com.example.fourtestapp.ui;

import android.content.Intent;
import android.os.Bundle;
import android.widget.ImageView;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.android.volley.RequestQueue;
import com.android.volley.toolbox.Volley;
import com.example.fourtestapp.R;
import com.example.fourtestapp.utils.ImageUtils;

public class ImageActivity extends AppCompatActivity {
    private ImageView image;
    private RequestQueue queue;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_img);
        queue = Volley.newRequestQueue(this);
        initView();
        Intent intent = getIntent();
        String url = intent.getStringExtra("url");
        ImageUtils.DownLoad(image,url,queue);
    }

    private void initView() {
        image = findViewById(R.id.image);
    }
}
